﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpSphinx.Util.Configuration;

namespace SharpSphinx.Util.Configuration
{


    /// <summary>
    /// Describes all methods necessary to process change events of a <code>ConfigurationManager</code>.
    /// </summary>
    public interface IConfigurationChangeListener
    {
        /// <summary>
        /// Called if the configuration of a registered compoenent named <code>configurableName</code> was changed.
        /// </summary>
        /// <param name="configurableName">The name of the changed configurable</param>
        /// <param name="PropertyName">The name of the property which was changed</param>
        /// <param name="cm">The <code>ConfigurationManager</code>-instance this component is registered to</param>
        void ConfigurationChanged(string configurableName, string PropertyName, ConfigurationManager cm);



      /// <summary>
        /// Called if a new compoenent defined by <code>ps</code> was registered to the ConfigurationManager
      /// </summary>
      /// <param name="cm"></param>
      /// <param name="ps"></param>
  
        void componentAdded(ConfigurationManager cm, PropertySheet ps); 

      
        /// <summary>
        /// Called if a compoenent defined by <code>ps</code> was unregistered (removed) from the ConfigurationManager
        /// </summary>
        /// <param name="cm"></param>
        /// <param name="ps"></param>
        void componentRemoved(ConfigurationManager cm, PropertySheet ps);




        /// <summary>
        /// Called if a compoenent was renamed.
        /// </summary>
        /// <param name="cm"></param>
        /// <param name="ps"></param>
        /// <param name="oldName"></param>
        void componentRenamed(ConfigurationManager cm, PropertySheet ps, String oldName);




    }
}
